package cn.jnetty.utils.create.excel;

/**
 * @author
 */
@JnettyDataTable
public class YtErrorCode implements DataTableMessage, Comparable<YtErrorCode> {
    private final int id;
    private final String name;
    private final String value;
    /**
     * 是否有弹窗
     */
    private final boolean popUp;

    public YtErrorCode() {
        this.id = 0;
        this.name = "";
        this.value = "";
        this.popUp = false;
    }

    public YtErrorCode(int id, String name, String value, boolean popUp) {
        this.id = id;
        this.name = name;
        this.value = value;
        this.popUp = popUp;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }

    public boolean isPopUp() {
        return popUp;
    }

    @Override
    public int id() {
        return id;
    }

    @Override
    public void afterInit() {

    }

    @Override
    public int compareTo(YtErrorCode o) {
        return this.id - o.getId();
    }
}